package com.yijiu.trb;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.widget.TextView;

/**
 * 关于我们
 * 
 * @author TangChao
 */
public class AboutActivity extends BTitleActivity
{
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about_activity_layout);
		titleView.setText("关于我们");
		TextView versionTextView = (TextView) findViewById(R.id.tv_about_version);
		try
		{
			versionTextView.setText("软件版本：" + getVersionName());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
	
	public String getVersionName() throws Exception
	{
		PackageManager packageManager = getPackageManager();
		PackageInfo packInfo = packageManager.getPackageInfo(getPackageName(), 0);
		String versionName = packInfo.versionName;
		return versionName;
	}
}
